package org.jeecg.demo.wx.convert;

import org.apache.ibatis.annotations.Mapper;
import org.jeecg.demo.wx.entity.EScheduled;
import org.jeecg.demo.wx.request.CreateEScheduledRequest;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface EScheduledConvert {
    EScheduledConvert INSTANCE = Mappers.getMapper(EScheduledConvert.class);

    @Mappings({
            @Mapping(target = "title", source = "title"),
            @Mapping(target = "content", source = "content"),
            @Mapping(target = "btime", source = "btime"),
            @Mapping(target = "etime", source = "etime"),
            @Mapping(target = "urgency", source = "urgency"),
            @Mapping(target = "fileName", source = "fileName"),
            @Mapping(target = "isRepeat", source = "isRepeat"),
            @Mapping(target = "filePath", source = "filePath"),
            @Mapping(target = "userid", source = "userid"),

    })
    EScheduled convert(CreateEScheduledRequest request);
}
